<?php

include("geoipcity.inc");
include("geoipregionvars.php");

function ip_resolve($ip) {
	$gi = geoip_open("./geoip/GeoLiteCity.dat", GEOIP_STANDARD);
	$record = geoip_record_by_addr($gi, $ip);
	$country = $record->country_code;
	$lat = $record->latitude;
	$long = $record->longitude;
	geoip_close($gi);
	return array($country, $lat, $long);
}

?>